Skip to content

Conversation

@chathhorn-galois
Copy link
Collaborator

@chathhorn-galois chathhorn-galois commented Dec 4, 2025

The copilot-bluespec package requires bsc (the Bluespec compiler) to be installed in order to run its test suite, but the builders that Hackage uses to run uploaded packages' test suites do not have bsc installed, causing Hackage to spuriously claim that copilot-bluespec's tests are failing.

This PR adds a cabal flag test-bluespec intended to enable tests that require the Bluespec compiler (bsc) to run. The default behavior of cabal test (with no flags) is now to not build the testsuite, preventing spurious test failures from appearing in Hackage reports. To enable building the testsuite, use: cabal test -f test-bluespec.

Fixes #673.

@chathhorn-galois chathhorn-galois changed the title copilot-bluespec: Update copilot-bluespec.cabal to only run tests when passed "test-bluespec" flag. Refs #673. copilot-bluespec: Update copilot-bluespec.cabal to only run tests when passed "test-bluespec" flag. Refs #673. Dec 4, 2025
@ivanperez-keera
Copy link
Member

ivanperez-keera commented Jan 6, 2026

Change Manager: @chathhorn-galois Can you please make the following changes to keep some entries and messages a bit shorter?

  • In the changelog, please reduce the entry to:
        * Disable test suite via newly added manual cabal flag. (#673)

In the commit message for the first commit, can you please modify the summary line to read similarly?

copilot-bluespec: Disable test suite via newly added manual cabal flag. Refs #673.

Please make these changes modifying your existing commits (without adding any more commits on top), and push force to your branch so that the PR is updated automatically.

Thanks!

…g. Refs Copilot-Language#673.

The copilot-bluespec package requires bsc (the Bluespec compiler) to be
installed in order to run its test suite, but the builders that Hackage uses to
run uploaded packages' test suites do not have bsc installed, causing Hackage
to spuriously claim that copilot-bluespec's tests are failing.

This commit adds a cabal flag `test-bluespec` intended to enable tests that
require the Bluespec compiler (`bsc`) to run. The default behavior of `cabal
test` (with no flags) is now to not build the testsuite, preventing spurious
test failures from appearing in Hackage reports. To enable building the
testsuite, use: `cabal test -f test-bluespec`.
@chathhorn-galois chathhorn-galois force-pushed the chathhorn/develop-fix-hackage-tests branch from f72d605 to 03fc7d4 Compare January 6, 2026 20:57
@chathhorn-galois
Copy link
Collaborator Author

Implementor: Fix implemented, review requested.

@ivanperez-keera ivanperez-keera changed the title copilot-bluespec: Update copilot-bluespec.cabal to only run tests when passed "test-bluespec" flag. Refs #673. copilot-bluespec: Disable test suite via newly added manual cabal flag. Refs #673. Jan 7, 2026
@ivanperez-keera
Copy link
Member

Change Manager: Verified that:

  • Solution is implemented:
    • The code proposed compiles and passes all tests. Details:
      Build log: https://app.travis-ci.com/github/Copilot-Language/copilot/builds/277177872
    • The solution proposed produces the expected result. Details:
      The following Dockerfile checks that the tests can be disabled via a flag, and that they can be re-enabled with the same flag, after which it prints the message "Success":
      FROM ubuntu:focal
      
      ENV DEBIAN_FRONTEND=noninteractive
      RUN apt-get update
      
      RUN apt-get install --yes \
            libz-dev \
            git \
            curl \
            gcc \
            g++ \
            make \
            libgmp3-dev  \
            pkg-config
      
      RUN mkdir -p $HOME/.ghcup/bin
      RUN curl https://downloads.haskell.org/~ghcup/0.1.50.2/x86_64-linux-ghcup-0.1.50.2 -o $HOME/.ghcup/bin/ghcup
      RUN chmod a+x $HOME/.ghcup/bin/ghcup
      ENV PATH=$PATH:/root/.ghcup/bin/
      ENV PATH=$PATH:/root/.cabal/bin/
      
      SHELL ["/bin/bash", "-c"]
      
      RUN ghcup install ghc 9.2
      RUN ghcup install cabal 3.2
      RUN ghcup set ghc 9.2.8
      RUN cabal update
      
      SHELL ["/bin/bash", "-c"]
      CMD git clone $REPO \
          && cd $NAME \
          && git checkout $COMMIT \
          && cd copilot-bluespec \
          && cabal v1-install --enable-tests --only-dependencies \
          && cabal v1-configure --enable-tests \
          && (cabal v1-test  | grep -e 'Package has no buildable test suites') \
          && cabal v1-install --enable-tests --only-dependencies -ftest-bluespec \
          && cabal v1-configure --enable-tests -ftest-bluespec \
          && ! cabal v1-test \
          && echo "Success"
      Command (substitute variables based on new path after merge):
      $ docker run -e REPO=https://github.com/GaloisInc/copilot-1 -e NAME=copilot-1 -e COMMIT=03fc7d4059d762641c8fccc9076533dca626aa63 copilot-verify-673
      
  • Implementation is documented. Details:
    New flag is documented.
  • Change history is clear.
  • Commit messages are clear.
  • Changelogs are updated.
  • Examples are updated. Details:
    No updates needed; change is to the cabal file.
  • Required version bumps are evaluated. Details:
    Bump not required; change is to Cabal package affecting tests only.

@ivanperez-keera ivanperez-keera merged commit ca6f3f6 into Copilot-Language:master Jan 7, 2026
1 check passed
@chathhorn-galois chathhorn-galois deleted the chathhorn/develop-fix-hackage-tests branch January 8, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

copilot-bluespec: Tests are failing on Hackage

2 participants